package org.rasterfun.language2

/**
 * Base class for unary operations (negation and logical not).
 * 
 * @author Hans Haggstrom
 */
abstract class UnaryOp(e: Expression, operator: String) extends Expression {

  override def children = List(e)
  
  def generateCode(context: Context, s: StringBuilder) {
    s.append(" ( ")
    s.append(operator)
    s.append(" ( ")
    e.code(context, s)
    s.append(" ) ) ")
  }


}

